package day0223

import "strings"

func replaceSpace1(s string) string {
	replaceAll := strings.ReplaceAll(s, " ", "%20")
	return replaceAll
}

func replaceSpace(s string) string {
	var newArray []byte
	for _, v := range s {
		if v == ' ' {
			newArray = append(newArray, []byte("%20")...)
		} else {
			newArray = append(newArray, byte(v))
		}
	}
	return string(newArray)
}
